<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
</html>
<script>
    var a=Number(prompt("请输入数字"))
    for(i=0;i<=a;i++){
        if(a%i==0){
            document.write("因数为："+i+" ")
        }
    }
</script>